"""
为了生产环境的数据安全，所有getenv的第二个参数都是测试环境地址
"""
import os

# mysql
SQLALCHEMY_DATABASE_URI = os.getenv(
    "SQLALCHEMY_DATABASE_URI", "mysql+pymysql://root:pZG=M81j2q8f=BGjkkQm@localhost:3306/yoka_test")

# redis
REDIS_HOST = os.getenv("REDIS_HOST", "localhost")
REDIS_PORT = int(os.getenv("REDIS_PORT", 6379))
REDIS_PASSWORD = os.getenv("REDIS_PASSWORD", "Nvg$t.lz8:OSn}h")
REDIS_DB = int(os.getenv("REDIS_DB", 10))  # 生产-0；测试-10

# ElasticSearch
ES_URL = os.getenv("ES_URL", "http://localhost:9200")
ES_USER = os.getenv("ES_USER", "elastic")
ES_PASSWORD = os.getenv("ES_PASSWORD", "pZG=M81j2q8f=BGjkkQm")

ES_KB_INDEX_NAME = os.getenv("ES_KB_NAME", 'yoka_kb_index_test')
ES_KB_EMERGENCY_NAME = os.getenv("ES_KB_EMERGENCY_NAME", 'yoka_kb_index_test_emergency')
ES_CLAUSE_INDEX_NAME = os.getenv("ES_CLAUSE_NAME", 'yoka_clause_index_test')
ES_IMAGE_INDEX_NAME = os.getenv("ES_IMAGE_NAME", 'yoka_image_index_test')

print(f"ES_KB_INDEX_NAME: {ES_KB_INDEX_NAME}")

# Minio
MINIO_URL = os.getenv("MINIO_URL", "localhost:9000")
MINIO_ACCESS_KEY = os.getenv("MINIO_ACCESS_KEY", "mLPvm0xudfWdFztgcvUT")
MINIO_SECRET_KEY = os.getenv("MINIO_SECRET_KEY", "BJegGnSOcxJKjb8Smbby0B3SvzDOvtxgaDxHcXcG")
MINIO_BUCKET_NAME = os.getenv("MINIO_BUCKET_NAME", "yoka")
